const localState = sessionStorage.getItem('state');
let rootState = {
    userInfo: {
        name: ''
    },
    personalDetails:{},
    imgurl: '',
    headerimgurl: '', //头像的地址
    nikename: '', //昵称
    titleName: '会计考证',
    isShowLogin: {}, //是否显示登录弹窗
    currentStep:"1",
    caseRulesList:[],//公司制度管理列表
    topicLoaded: "",// 题目加载
    questionList:[],// 课程测验的题目列表
    questionSort:[],// 答题卡部分
    menus:[],//菜单
    authentication:"",
    relationQuestion:[],// 关联性的题目列表
    noteCount:0,// 未读通知数
    certificateNum:0,// 考核计划数
    getobjectlist:[],// 大数据列表
    noticeKey:"0",//通知公告索引权限
    testPaperInfo:{},// 测试题目的信息
}
let studentsState = {}
let teachersState = {
    teacher_courselist: {}, //教师端课程列表
}

if (localState) {
    let state = JSON.parse(localState)
    // console.log("状态管理器的值",state)
    rootState.userInfo = state.userInfo;
    rootState.personalDetails = state.personalDetails;
    rootState.isShowLogin = state.isShowLogin;
    rootState.currentStep = state.currentStep;
    rootState.caseRulesList = state.caseRulesList; // 公司制度管理
    rootState.relationQuestion = state.relationQuestion; // 关联性的题目列表
    rootState.questionList = state.questionList; // 关联性的题目列表
    rootState.questionSort = state.questionSort; // 答题卡部分
    rootState.getobjectlist = state.getobjectlist; // 大数据列表
    rootState.menus = state.menus; 
    rootState.authentication = state.authentication; 
    rootState.noteCount = state.noteCount; 
    rootState.certificateNum = state.certificateNum; 
    rootState.noticeKey = state.noticeKey; 
    rootState.testPaperInfo = state.testPaperInfo;  //考试的试卷信息
}

export default {
    rootState,
    studentsState,
    teachersState,
}